<?php
session_start();
require_once($_SERVER['DOCUMENT_ROOT']."/apps/class/transaction.php");
$description="Account 03";
$currency="EUR";
$action = "LIST";



if($action == "ADD"){
  $result = account::create_account_in_db($description,$currency);
  $account = new account($result);
}

if($action == "DELETE"){
  $account = new account($result);
}

if($action == "MODIFY"){
  $result = account::create_account_in_db($description,$currency);  
}

if($action == "LIST"){
  $accounts = new accounts('json');
  $result = $accounts->get_list_accounts();
  echo $result;
}






?>